<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <title>Spitter</title>
    <link rel="stylesheet" type="text/css" th:href="@{/resources/style.css}"/>
</head>
<!--页面加载完执行聚焦于username-->
<body onload="document.f.username.focus()">
<!--<body>-->

<div id="header" th:include="page :: header"></div>
<div id="content">
    <a th:href="@{/spitter/register}">Register</a>

    <!--必须为/login,否则不走Security-->
    <form name="f" th:action="@{/login}" method="post">
        <table>
            <tr>
                <td>User:</td>
                <td>
                    <input type="text" name="username" value=""/>
                </td>
            </tr>
            <tr>
                <td>Password:</td>
                <td>
                    <input type="password" name="password" value=""/>
                </td>
            </tr>
            <tr>
                <td>
                    <input id="remember_me" type="checkbox" name="remember-me"/>
                    <label for="remember_me" class="inline">Remember me</label>
                </td>
            </tr>
            <tr>
                <td><input type="submit" name="submit" value="Login"/></td>
            </tr>
        </table>
    </form>
</div>
<div id="footer" th:include="page :: copy"></div>

</body>
</html>